﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>
    <%@ include file="/include/base.jsp" %>
    <title>${de.tableComment}</title>
    <script>  
        var isAdd="true";
    </script>
    <script src="js/${de.entityName}.js?date=<%=currentTime%>"></script>
</head>
<body class="easyui-layout">
<div data-options="region:'center',title:'',split:true">
	<div id="${de.entityNameAlias}ToolBar" style="height: 30px;">
	    <form id="searchForm" style="align-items: center; margin-top:4px;margin-left:6px;">
	      <#list columnEntitys as columnEntity>
	      	<#if columnEntity.search==true>
	      		<span>${columnEntity.entityColumnComment}：</span>
	      		<#if columnEntity.op=='<>='>
	      		<input   name="search_${columnEntity.entityColumnNam}" id="search_${columnEntity.entityColumnNam}Big" op=">="  class="easyui-${columnEntity.uiTyp}"/>
	   			-<input  name="search_${columnEntity.entityColumnNam}" id="search_${columnEntity.entityColumnNam}End" op="<="  class="easyui-${columnEntity.uiTyp}"/>
	      		<#else>
	      			<input data-options=""  name="search_${columnEntity.entityColumnNam}"  class="easyui-${columnEntity.uiTyp}" id="search_${columnEntity.entityColumnNam}" op="${columnEntity.op}"/>
	     		</#if>
	     	</#if>
	      </#list>
	        <a class="easyui-linkbutton" iconCls="icon-search" onclick="query${de.entityName}();">查询</a>
	        <%--<a class="easyui-linkbutton" iconCls="icon-cancel" onclick="cleanFun();">清空</a>--%>
	        <%--<shiro:hasPermission name="user:add">--%>
	        <a class="easyui-linkbutton" iconCls="icon-add" onclick="add${de.entityName}()">增加</a>
	        <%--</shiro:hasPermission>--%>
	        <%--<shiro:hasPermission name="user:edit">--%>
	        <a class="easyui-linkbutton" iconCls="icon-edit" onclick="edit${de.entityName}()">修改</a>
	        <%--</shiro:hasPermission>--%>
	        <%--<shiro:hasPermission name="user:delete">--%>
	        <a class="easyui-linkbutton" iconCls="icon-remove" onclick="delete${de.entityName}()">删除</a>
	        <%--</shiro:hasPermission>--%>
	    </form>
	</div>
	<!--easyUI查询表格-->
	<table id="${de.entityNameAlias}Table" data-options="fit:true,border:false"></table>

	<div id="${de.entityNameAlias}-dlg-buttons">
    	<a href="#" class="easyui-linkbutton" iconCls="icon-ok" onclick="javascript:save${de.entityName}();return false;">保存</a>
    	<a href="#" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#${de.entityNameAlias}Dialog').dialog('close');return false;">关闭</a>
	</div>

	<div id="${de.entityNameAlias}Dialog" class="easyui-dialog" style="width:${de.dialogWidth}px;height:${de.dialogHeight}px;padding:10px 15px;padding-bottom:0px;"
	     closed="true" buttons="#${de.entityNameAlias}-dlg-buttons" data-options="cache: false,modal: true" title="${de.tableComment}  ">
	    <form id="${de.entityNameAlias}Form" novalidate class="dialogForm" method="post" novalidate style="padding-bottom:0px;">
	        <#list columnEntitys as columnEntity>
	        	<#if columnEntity.formhidden=='true'>
	        		<input type='hidden' id='${de.entityNameAlias}_${columnEntity.entityColumnNam}' name='${columnEntity.entityColumnNam}'/>	
	        	</#if>
	        </#list>
	        
	        <table cellspacing="12" cellpadding='2'>
	     <#list noFormHiddenlist as columnEntity>
	        <#if (columnEntity_index%de.columnNum)==0>
	          <tr>
	        </#if>
	        <td class=""><span>${columnEntity.entityColumnComment}：</span></td>
	        <td class="">
	        <#if (columnEntity.uiTyp?index_of("combo")>-1)>
	          <input name="${columnEntity.entityColumnNam}" id="${de.entityNameAlias}_${columnEntity.entityColumnNam}" style="width:180px;"/>
	        <#elseif (columnEntity.uiTyp?index_of("numberbox")>-1)>
	          <input name="${columnEntity.entityColumnNam}" id="${de.entityNameAlias}_${columnEntity.entityColumnNam}" style="width:180px;" class="easyui-${columnEntity.uiTyp}" data-options='required:${columnEntity.required?string("true","false")},precision:${columnEntity.scale}' />
	           <#elseif (columnEntity.uiTyp?index_of("textarea")>-1)>
	            <input name="${columnEntity.entityColumnNam}" id="${de.entityNameAlias}_${columnEntity.entityColumnNam}" style="width:180px;height:50px" class="easyui-textbox" data-options='required:${columnEntity.required?string("true","false")},multiline:true' />
	          <#else>
	          <input name="${columnEntity.entityColumnNam}" id="${de.entityNameAlias}_${columnEntity.entityColumnNam}" style="width:180px;" class="easyui-${columnEntity.uiTyp}" data-options='required:${columnEntity.required?string("true","false")}' />
	        </#if>
	        </td>
	 
	        <#if (columnEntity_index%de.columnNum)==(de.columnNum-1)>
	          </tr>
	        </#if>
	      </#list>
 
	  </table>
	    </form>
	</div>
</div>
</body>
